import com.world.common.enums.YesNo;
import org.junit.Test;

/**
 * Created by gang on 2016/10/11.
 */
public class EnumUtil {

    @Test
    public void trans() {
        String json = "{";
        for (YesNo enumtype : YesNo.values()) {
            json += "'" + enumtype.name() + "':'" + enumtype.getName() + "',";
        }
        json = json.substring(0, json.length() - 1) + "}";
        System.out.println(json);
    }
}
